package com.mars.module.admin.entity;

import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;

/**
 * 订单明细对象 sys_order_details
 *
 * @author mars
 * @date 2024-02-27
 */

@Data
@ApiModel(value = "订单明细对象")
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_order_details")
public class SysOrderDetails{

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 订单ID
     */
    @Excel(name = "订单ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "订单ID")
    private Long orderId;
    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "商品ID")
    private Long productId;
    /**
     * 商品数量
     */
    @Excel(name = "商品数量")
    @ApiModelProperty(value = "商品数量")
    private Integer amount;
    /**
     * 商品单价
     */
    @Excel(name = "商品单价")
    @ApiModelProperty(value = "商品单价")
    private BigDecimal price;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品名称")
    private String productName;
}
